import request from '@/utils/request'

/**
 * login func
 * parameter: {
 *     username: '',
 *     password: '',
 *     remember_me: true,
 *     captcha: '12345'
 * }
 * @param parameter
 * @returns {*}
 */
export function list (data) {
  return request({
    url: '/h5/task/listByPage',
    method: 'post',
    data
  })
}

export function frozen (data) {
  return request({
    url: '/h5/task/frozen',
    method: 'post',
    data
  })
}

export function active (data) {
  return request({
    url: '/h5/task/active',
    method: 'post',
    data
  })
}

export function jobList (data) {
  return request({
    url: '/h5/boss/listByPage',
    method: 'post',
    data
  })
}

export function jobActive (data) {
  return request({
    url: '/h5/boss/active',
    method: 'post',
    data
  })
}

export function jobFrozen (data) {
  return request({
    url: '/h5/boss/frozen',
    method: 'post',
    data
  })
}

export function taskTileList () {
  return request({
    url: `/h5/anno/getDictValueByCode?code=task_title`,
    method: 'get'
  })
}

export function recruitList (data) {
  return request({
    url: '/pc/takeJob/listByPage',
    method: 'post',
    data
  })
}

export function recruitActive (data) {
  return request({
    url: '/pc/takeJob/active',
    method: 'post',
    data
  })
}

export function recruitFrozen (data) {
  return request({
    url: '/pc/takeJob/frozen',
    method: 'post',
    data
  })
}
